﻿function ProjectTabs(title, key, width, height) {
    $document = $('#Div1', window.top.document);
    try {
        $document.dialog({
            title: title,
            width: width,
            height: height
        });
        $('#tt').tabs({
            width: width - 46,
            height: height - 60
        });
        $('#ttProjectInfo', window.top.document).attr("src", "/ProjectInfo/Modify.aspx?id=" + key);
        $('#ttMainContract', window.top.document).attr("src", "/Contract/Add.aspx?ContractType=0&ProjectId=" + key);
        $('#ttPartContract', window.top.document).attr("src", "/Contract/Add.aspx?ContractType=1&ProjectId=" + key);
        $('#ttIframeCheckupForm', window.top.document).attr("src", "/CheckupForm/Manage.aspx?ProjectId=" + key);
        $('#ttIframeISO', window.top.document).attr("src", "/ISOForm/ISOManage.aspx?ProjectId=" + key);
        $('#ttIframeMaterial', window.top.document).attr("src", "/Material/Manage.aspx?ProjectId=" + key);
        $('#ttIframeLog', window.top.document).attr("src", "/ProjectInfo/ProjectLog.aspx?ProjectId=" + key);
        $('#ttIframeProcess', window.top.document).attr("src", "/ProjectInfo/ProjectProgress.aspx?ProjectId=" + key);
        $('#ttIframeFeedBack', window.top.document).attr("src", "/ProjectInfo/ProjectFeedBack.aspx?ProjectId=" + key);
        $document.dialog('open');
    } catch (e) {
        window.onload = ProjectTabs(title, key, width, height);
        return;
    }
};
$(function () {
    $('#Div1').dialog({
        draggable: true,
        resizable: true,
        closed: true,
        autoOpen: false
    });
    $('#tt').tabs();
});
function ProjectCareTabs(title, key, width, height) {
    //    if (!dialog) {
    //        document.write("<script src='/Components/EasyUI/jquery.easyui.min.js'><\/script>");
    //    }
    $document = $('#Div1', window.top.document);
    try {
        $document.dialog({
            title: title,
            width: width,
            height: height
        });
        $('#tt').tabs({
            width: width - 46,
            height: height - 60
        });
        $('#ttProjectInfo', window.top.document).attr("src", "/ProjectInfo/ProjectCareModify.aspx?id=" + key);
        $('#ttMainContract', window.top.document).attr("src", "/Contract/ProjectCareContract.aspx?ContractType=0&ProjectId=" + key);
        $('#ttPartContract', window.top.document).attr("src", "/Contract/ProjectCareContract.aspx?ContractType=1&ProjectId=" + key);
        $('#ttIframeCheckupForm', window.top.document).attr("src", "/CheckupForm/Manage.aspx?ProjectId=" + key);
        $('#ttIframeISO', window.top.document).attr("src", "/ISOForm/ISOManage.aspx?ProjectId=" + key);
        $('#ttIframeMaterial', window.top.document).attr("src", "/Material/Manage.aspx?ProjectId=" + key);
        $('#ttIframeLog', window.top.document).attr("src", "/ProjectInfo/ProjectLog.aspx?ProjectId=" + key);
        $('#ttIframeProcess', window.top.document).attr("src", "/ProjectInfo/ProjectProgress.aspx?ProjectId=" + key);
        $('#ttIframeFeedBack', window.top.document).attr("src", "/ProjectInfo/ProjectFeedBack.aspx?ProjectId=" + key);
        $document.dialog('open');
    } catch (e) {
        window.onload = ProjectCareTabs(title, key, width, height);
        return;
    }
};
function ProjectSearchTabs(title, key, width, height) {
    //    if (!dialog) {
    //        document.write("<script src='/Components/EasyUI/jquery.easyui.min.js'><\/script>");
    //    }
    $document = $('#Div1', window.top.document);
    try {
        $document.dialog({
            title: title,
            width: width,
            height: height
        });
        $('#tt').tabs({
            width: width - 46,
            height: height - 60
        });
        $('#ttProjectInfo', window.top.document).attr("src", "/ProjectInfo/ProjectCareModify.aspx?id=" + key);
        $('#ttMainContract', window.top.document).attr("src", "/Search/ContractSearch.aspx?ContractType=0&ProjectId=" + key);
        $('#ttPartContract', window.top.document).attr("src", "/Search/ContractSearch.aspx?ContractType=1&ProjectId=" + key);
        $('#ttIframeCheckupForm', window.top.document).attr("src", "/Search/CheckFormSearch.aspx?ProjectId=" + key);
        $('#ttIframeISO', window.top.document).attr("src", "/Search/ISOFormSearch.aspx?ProjectId=" + key);
        $('#ttIframeMaterial', window.top.document).attr("src", "/Search/MaterialSearch.aspx?ProjectId=" + key);
        $('#ttIframeLog', window.top.document).attr("src", "/Search/ProjectLogSearch.aspx?ProjectId=" + key);
        $('#ttIframeProcess', window.top.document).attr("src", "/Search/ProjectProgressSearch.aspx?ProjectId=" + key);
        $('#ttIframeFeedBack', window.top.document).attr("src", "/Search/ProjectFeedBackSearch.aspx?ProjectId=" + key);
        $document.dialog('open');
    } catch (e) {
        window.onload = ProjectCareTabs(title, key, width, height);
        return;
    }
};